#ifndef DATABASECONN_H
#define DATABASECONN_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlError>
#include <QFile>

class DatabaseConn : public QObject
{
public:
    DatabaseConn();

public:
    DatabaseConn(QObject *parent = 0);
    ~DatabaseConn();
    bool openConnection();
    bool closeConnection();
    bool openDB();
    QSqlError lastError();
    inline QSqlDatabase getDataBase(){return this->db;}

protected:
    QSqlDatabase db;
    QString databaseName;
};

#endif // DATABASECONN_H
